<script setup lang="ts">
import { ref } from 'vue'
import { AppConfigStore } from '@/stores/app'

import { RouterView } from 'vue-router'
import NavBar from './components/navbar.vue'
import Footer from './components/footer.vue'

import { Affix, Modal } from 'ant-design-vue'
import LoginModal from './components/login.vue'
const top = ref<number>(0)
const handleOk = () => {}
const appConfig = AppConfigStore()
</script>

<template>
  <Affix :offset-top="top">
    <NavBar />
  </Affix>

  <div class="main">
    <RouterView />
    <Modal
      v-model:open="appConfig.loginModalShow"
      @ok="handleOk"
      :footer="null"
      :title="null"
      :closable="false"
      style="background: transparent"
      wrapClassName="login_wrapper"
    >
      <LoginModal />
    </Modal>
  </div>
</template>

<style lang="scss">
.main {
  min-height: 100%;
  min-width: 1200px;
}
.login_wrapper {
  .ant-modal {
    .ant-modal-content {
      background: transparent;
      box-shadow: none;
    }
  }
}
</style>
